/* 
 * File:   cantrips.h
 * Author: cow
 *
 * Created on September 28, 2011, 4:02 PM
 */

#ifndef CANTRIPS_H
#define	CANTRIPS_H


//includes---------------------------------------
#include "handlers.h"
#include "../screens/Screen.h"
//includes=======================================

//defines----------------------------------------
enum CantripType{
	cantrip_void,
	cantrip_grid
};
//defines========================================

//prototypes-------------------------------------
class cantrip;
class gridCantrip;
//prototypes=====================================

//definitions------------------------------------
class cantrip : public updateHandler{
public:
	virtual void draw() = 0;
	virtual void onUpdate(float timeElapsed) = 0;
	CantripType ct;
};
class gridCantrip : public cantrip{
public:
	//constructors-----------
	gridCantrip(screen* drawTo);
	//accesors---------------
	int getLineWidth();
	int getLineHeight();
	//view manips------------
	void draw();
	//lines------------------
	void setScale(float scale);
	void setLineSpacing(int width, int height);
	void setLineWidths(int linewidth, int highlinewidth);
	void drawLines(bool lines);
	void setHighLinesDash(double* spacing, int arrSize);
	void setLineDash(double* spacing, int arrSize);
	void setHighlightLineSpacing(int spaceing);
	void setLineRGB(float R, float G, float B);
	void setHighlightLineRGB(float R, float G, float B);
private:
	//screen-----------------
	screen* drawTo;
	//lines------------------
	bool drawlines;
	int lineHorizSpacing;
	int lineVertSpacing;
	int lineWidth;
	int highLineWidth;
	int highlightLine;
	double* highDash;
	int highDashSize;
	double* lowDash;
	int lowDashSize;
	//line colour------------
	float lowR;
	float lowG;
	float lowB;
	float highR;
	float highG;
	float highB;
};
//definitions====================================

#endif	/* CANTRIPS_H */

